package com.itypd.threadpool;

import com.itypd.thread.TestThread;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/*
 * @Description:
 * @Athor: GongMingwei
 * @version: v1.0
 */
public class CachedThreadPoolTest {
    public static void main(String[] args) {
        ExecutorService threadPool = Executors.newCachedThreadPool();
        for(int i = 0; i < 5; i++){
            threadPool.execute(new TestThread());
        }
        threadPool.shutdown();
    }
}
